package 拼三角;

import java.util.Arrays;
import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    static int N = 6;
    static boolean ans;
    static int[] g = new int[N];
    static int[] f = new int[N];
    static boolean[] st = new boolean[N];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int T = in.nextInt();
        while (T-- > 0) {
            for (int i = 0; i < 6; i++) {
                g[i] = in.nextInt();
            }
            ans = false;
            dfs(0);
            if (ans) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }

    private static void dfs(int u) {
        if (u == 6) {
            if (check(f[0], f[1], f[2]) && check(f[3], f[4], f[5])) {
                ans = true;
            }
            return;
        }
        for (int i = 0; i < 6; i++) {
            if (!st[i]) {
                f[u] = g[i];
                st[i] = true;
                dfs(u + 1);
                st[i] = false;
                f[u] = 0;
            }
        }
    }

    private static boolean check(int i, int j, int k) {
        int[] arr = {i, j, k};
        Arrays.sort(arr);
        if (arr[0]+arr[1] > arr[2] && arr[2] - arr[0] < arr[1]) {
            return true;
        }
        return false;
    }
}
